<?php
/**
 * Created by JetBrains PhpStorm.
 * User: alex
 * Date: 31.07.13
 * Time: 13:30
 * To change this template use File | Settings | File Templates.
 */
function get($url,$proxy) {
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

	//curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxyauth);
	curl_setopt($curl, CURLOPT_HEADER, 1);

	curl_setopt($curl, CURLOPT_TIMEOUT, 600);
	curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1');
	curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
	curl_setopt($curl, CURLOPT_REFERER, 'http://www.google.com/ ');

	curl_setopt($curl, CURLOPT_URL, "$url");
	curl_setopt($curl, CURLOPT_PROXY, "$proxy");
	$content = curl_exec($curl);
	curl_close($curl);
	return $content;
}



      $proxy = array (
		  '192.3.156.131:3128',
		  '173.213.113.111:8089',
		  '192.3.1.96:3128',
		  '192.3.156.131:7808',
		  '50.31.113.249:7808',
		  '173.213.113.111:7808',
		  '174.129.173.237:8808',
		  '192.3.1.96:7808',
		  '192.3.23.95:3128',
	  );
	$key = rand(0,count($proxy)-1);
      $a=get('https://www.google.com.ua/#sclient=psy-ab&q=gmail+site:rabota.ua&oq=gmail+site:rabota.ua&gs_l=hp.3...2212.2212.1.2898.1.1.0.0.0.0.64.64.1.1.0....0.0..1c.1.20.psy-ab.NRtDbuDkLi4&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.49967636%2Cd.bGE%2Cpv.xjs.s.en_US.jOYpRJj4zMA.O&fp=59293773e68c8411&biw=1366&bih=643',$proxy[$key]);
      echo $a;
